﻿<Window x:Class="BasicVmDemo.MainWindow"
        xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
        Title="MainWindow" Height="180.21" Width="257.83">
    <Grid Margin="5">
        <Grid.ColumnDefinitions>
            <ColumnDefinition Width="Auto"/>
            <ColumnDefinition Width="100*"/>
        </Grid.ColumnDefinitions>
        <Grid.RowDefinitions>
            <RowDefinition Height="Auto"/>
            <RowDefinition Height="Auto"/>
            <RowDefinition Height="Auto"/>
            <RowDefinition Height="*"/>
        </Grid.RowDefinitions>

        <TextBlock Margin="5">Name</TextBlock>
        <TextBox Grid.Column="1" Margin="5" Text="{Binding Name, Mode=TwoWay,UpdateSourceTrigger=PropertyChanged}"></TextBox>

        <TextBlock Grid.Row="1" Margin="5">Name</TextBlock>
        <TextBlock Grid.Row="1" Grid.Column="1" Margin="5" Text="{Binding Name}"></TextBlock>

        <StackPanel Grid.Row="2" Grid.Column="1" Margin="5" Orientation="Horizontal">
            <Button  Command="{Binding ShowName}">Show Name</Button>
        </StackPanel>

    </Grid>
</Window>
